package com.rytx.system.domain.ysp;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.rytx.common.annotation.Excel;
import com.rytx.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;

/**
 * 用户浏览记录对象 art_view_history
 * 
 * @author rytx
 * @date 2024-05-22
 */
public class ArtViewHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 浏览记录ID */
    private Long viewId;

    /** 用户ID */
    @Excel(name = "用户ID")
    @NotBlank(message = "用户ID不能为空")
    private Long userId;

    /** 艺术品ID */
    @Excel(name = "艺术品ID")
    @NotBlank(message = "艺术品ID不能为空")
    private Long artId;

    /** 查看时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "查看时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date viewedAt;

    public void setViewId(Long viewId) 
    {
        this.viewId = viewId;
    }

    public Long getViewId() 
    {
        return viewId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setArtId(Long artId) 
    {
        this.artId = artId;
    }

    public Long getArtId() 
    {
        return artId;
    }
    public void setViewedAt(Date viewedAt) 
    {
        this.viewedAt = viewedAt;
    }

    public Date getViewedAt() 
    {
        return viewedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("viewId", getViewId())
            .append("userId", getUserId())
            .append("artId", getArtId())
            .append("viewedAt", getViewedAt())
            .toString();
    }
}
